﻿using DFGK_WMS.Model.Dto;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK.IService
{
    public interface IMaterialCategoryService
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool AddMaterialCategory(MaterialCategory m, out string message);

        /// <summary>
        /// 列表显示
        /// </summary>
        /// <param name="mname"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<MenuDto> GetMaterialCategortList(string? mname, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 添加-树形显示
        /// </summary>
        /// <returns></returns>
        List<Menuitem> GetMaterialCateMenuitemList();

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="mid"></param>
        /// <returns></returns>
        bool DelMaterialCategory(long mid);

        /// <summary>
        /// 查看
        /// </summary>
        /// <param name="mid"></param>
        /// <returns></returns>
        MaterialCategory? GetMaterialCategoryById(long mid);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdMaterialCategory(MaterialCategory m, out string message);
    }
}
